<template>
  <div class="all" ref="ActiveYear5">
    <div class="bg" v-if="reportFifthJson">
      <LImage class="img-bg" :src="Config.img('2201_bg.png')"></LImage>
      <div class="allab">
        <LImage class="img-stars" :src="Config.img('2201_stars.png')"></LImage>
      </div>
      <LImage class="img-moon" :src="Config.img('2201_moon.png')"></LImage>
      <LImage class="img-spot-right" :src="Config.img('2201_right_spot.png')"></LImage>
      <LImage class="img-log" :src="Config.img('2201_page5_logo.png')"></LImage>
      <LImage class="img-spot-left" :src="Config.img('2201_left_spot.png')"></LImage>

      <div class="height80"></div>
      <richtext class="richtext" :style="{'background-color':stylek}">
        <span class="font52 text-yellow">{{reportFifthJson.strategy.counterCoin}}</span>
        <span class="font30 text1">{{'一定是你的心头好'}}</span>
      </richtext>
      <richtext class="richtext" :style="{'background-color':stylek}">
        <span class="font30 text1">{{'你为此开了'}}</span>
        <span class="font52 text-yellow">{{reportFifthJson.strategy.count}}</span>
        <span class="font30 text1">{{'次策略'}}</span>
      </richtext>

      <div class="height40"></div>
      <text class="font30 text1">{{'“拿住”“还能涨”“团队在做事”，'}}</text>

      <div class="height40"></div>
      <richtext class="richtext" :style="{'background-color':stylek}">
        <span class="font30 text1">{{'三句话你为TA花了'}}</span>
        <span class="font30 text-yellow">{{'$'}}</span>
        <span class="font52 text-yellow">{{reportFifthJson.strategy.usdtNum}}</span>
      </richtext>

      <div class="height40"></div>
      <richtext class="richtext" :style="{'background-color':stylek}">
        <span class="font30 text1">{{'这个币今年行情波动'}}</span>
        <span v-if="reportFifthJson.change > 0" class="font52 text-yellow">{{'+'}}</span>
        <span class="font52 text-yellow">{{reportFifthJson.change}}</span>
        <span class="font30 text-yellow">{{'%'}}</span>
      </richtext>

      <div class="height40"></div>
      <text class="font30 text-yellow">{{'你还会继续持有吗？'}}</text>


      <div class="all"></div>
      <div class="but" @stopPropagation="stopPropagation" @click="otClick"></div>
    </div>
  </div>
</template>

<style src="@/_css/style.css" ></style>
<style scoped>
  .richtext {
    background-color:rgba(0, 0, 0, 0)
  }
  .yinyue {
    position: absolute;
    right: 40;
    top: 40;
    width: 60px;
    height: 60px;
  }
  .text1 {
    color: #E5F3FF;
  }
  .bg {
    overflow: hidden;
    flex: 1;
    padding-left: 70px;
    padding-right: 70px;
  }
  .allab {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    justify-content: center;
    align-items: center;
  }
  .img-bg {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
  }
  .img-stars {
    width: 719px;
    height: 766px;
  }
  .img-moon {
    position: absolute;
    top: 100;
    right: -130px;
    width: 260px;
    height: 260px;
  }
  .img-spot-left {
    position: absolute;
    bottom: 380;
    left: 10;

    width: 88px;
    height: 93px;
  }
  .img-spot-right {
    position: absolute;
    bottom: 288;
    right: 0;
    
    width: 147px;
    height: 155px;
  }
  .img-log {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 750px;
    height: 790px;
  }

  .img-text {
    width: 296px;
    height: 119px;
    margin-top: 40px;
  }
  .but {
    height: 160px;
  }
  .height80 {
    height: 80px;
  }
  .mb40 {
    margin-bottom: 40px;
  }
  .text-yellow {
    color: #F6CF54;
  }
</style>

<script>

//功能
import jconfig from "@/_js/config"; 
import jmath from "@/_js/math"; 
export default {

  props:{
    data:{
      type:Object,
      default:undefined,
    },
  },
  
  data() {
    return {
      Config: jconfig,
      data:undefined,
      reportFifthJson:undefined,
    }
  },

  /* reportFifthJson 5
    * 
    *   change 
    *   strategy 
    * "reportFifthJson":{
            "change":"0",
            "strategy":{
                "usdtNum":5811.6561,
                "count":30,
                "counterCoin":"BTC",
                "exchangeName":"OkexV5"
            }
        },
    **/
  mounted(){
    var reportFifthJson = this.data.reportFifthJson;
    reportFifthJson.change = jmath.cheng(reportFifthJson.change, 100, 2, 2);
    this.reportFifthJson = reportFifthJson;
    setTimeout(() => {
      this.stylek = 'rgba(0, 0, 0, 0)';
      this.$forceUpdate();
    }, 1000);
  },

  methods:{
    /******************** 点击*/
    
    /******************** 手势*/
    stopPropagation(){
      return true;
    },

    /******************** 按钮*/
    //查看
    otClick() {
      this.$emit("ot", this.$refs.ActiveYear5, 6);
    },
  }
}
</script>
